
#region Imported Namespaces
using System;
using System.Data;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Web;
using System.Web.UI;
using System.Web.UI.Design;
using System.Web.UI.WebControls;

using PHSRAG.Insight21.SearchContext;
using Policy = PHSRAG.Insight21.Policy;
using PHSRAG.Utility;
using PHSRAG.Insight21;
using PHSRAG.Insight21.Context;
#endregion

namespace PHSRAG.Insight21.InsightWebControls
{
	/// <summary>
	/// The AgreementsSubNavigation control provides the two-level navigation for the Agreements module. The first level
	/// is at the summary level, and the second level is at the overview level.
	/// </summary>
	[ToolboxData("<{0}:AgreementsSubNavigation runat=server />")]
	[Designer(typeof(AgreementsSubNavigationDesigner), typeof(IDesigner))]
	public class AgreementsSubNavigation : SubNavigation
	{
		#region Constants
		private const string EnableOverviewNavigationKey = "EnableOverviewNavigation_B4847917-E2A8-4f9c-A602-CDC0878D3D10";
		private const string SelectedAgreementSubNavigationLinkKey = "SelectedAgreementSubNavigationLink_B4847917-E2A8-4f9c-A602-CDC0878D3D10";
		#endregion

		#region Constants (Public)
		public const string BudgetOverviewCommand = "Budget Overview";
		public const string ExpenseOverviewCommand = "Expense Overview";		
		public const string SalaryOverviewCommand = "Salary Overview";
		public const string TransactionOverviewCommand = "Transactions Overview";
        public const string CommandNameArraPIQuestionnaire = "PI Questionnaire";
        public const string CommandNameArraStimulusFunding = "Stimulus Funding";
        public const string ArraProposalDataCommand = "Proposal Data";
        public const string ArraSubRecipientDataCommand = "Sub Recipient Data";
        public const string ArraVendorDataCommand = "Vendor Data";
        public const string CommandNameAdvanceFundRequest = "Advance Fund Request";
		#endregion 

		#region Instance Variables
		private LinkButton agreementSummaryLink;
		private LinkButton budgetOverviewLink;
		private Policy.ICachePolicy	cachePolicy;
		private LinkButton expenseOverviewLink;
		private LinkButton financialSummaryLink;
        private LinkButton arraPIQuestionnaireLink;
        private LinkButton arraStimulusFundingLink;
        private LinkButton arraProposalDataLink;
        private LinkButton arraSubRecipientDataLink;
        private LinkButton arraVendorDataLink;
		private LinkButton salaryOverviewLink;
		private LinkButton transactionsOverviewLink;
        private LinkButton advanceFundRequestLink;

        private int intAccessLevel;
        private int intAdmPersonId;
        private bool blnShowArraPIQuestionnaire = false;
        private bool blnShowArraStimulusFunding = false;
        private bool blnShowAdvanceFundRequest = false;

		#endregion

		#region Overrides
		protected override void OnInit(EventArgs e)
		{
			base.OnInit(e);
			cachePolicy = (Policy.ICachePolicy)Page.Session[Policy.Names.CachePolicyKey];
		}

		protected override void OnPreRender(EventArgs e)
		{
			if (!EnableOverviewNavigation)
			{
				foreach(Control c in Controls)
				{
					if (c.ID == "overviewLinks")
					{
						Table table = (Table)c;
						table.Attributes.Add("style", "display:none");
						
					}
				}
			}
			base.OnPreRender (e);
		}

		#endregion

		#region Public Methods
		/// <summary>
		/// Remove the overview-level sub-navigation info. This will un-highlight any tab at the overview level when a
		/// summary-level navigation is carried out.
		/// </summary>
		public void ResetOverviewNavigation()
		{
			Pair pair = Page.Session[SelectedSubNavigationLinkKey] as Pair;
			if (pair != null)
			{
				pair.Second = null;
				Page.Session[SelectedSubNavigationLinkKey] = pair;
			}
		}
		#endregion

		#region Public Properties
		/// <summary>
		/// Get/Set the predicate controlling whether the over navigation bar is to be displayed.
		/// </summary>
		public bool EnableOverviewNavigation
		{
			get { object o = ViewState[EnableOverviewNavigationKey]; return (o == null) ? false : (bool)o; }
			set { ViewState[EnableOverviewNavigationKey] = value; }
		}

		/// <summary>
		/// Set the selected overview link so that on load, the appropriate tab may be shown highlighted. This property is invoked
		/// by pages while vectoring to other pages which host this navigation control.
		/// </summary>
		public string SelectedOverviewLink
		{
			set 
			{ 
				Pair pair = Page.Session[SelectedSubNavigationLinkKey] as Pair;
				if (pair != null)
				{
					pair.Second = value;
					Page.Session[SelectedSubNavigationLinkKey] = pair;
				}
			}
			
		}

		/// <summary>
		/// Set the selected link so that on load, the appropriate tab may be shown highlighted. This property is invoked
		/// by pages while vectoring to other pages which host this navigation control.
		/// </summary>
		public string SelectedLink
		{
			set 
			{
				Pair pair = Page.Session[SelectedSubNavigationLinkKey] as Pair;
				if (pair != null)
				{
					pair.First = value;
					Page.Session[SelectedSubNavigationLinkKey] = pair;
				}
			}
		}

		#endregion

		#region SubNavigation Methods
		/// <summary>
		/// Create all controls in the AgreementsSubNavigation.
		/// </summary>
		protected override void CreateControls()
		{
            SetRequiredControls();

			Controls.Clear();

			agreementSummaryLink = new LinkButton();
			agreementSummaryLink.CommandName = agreementSummaryLink.Text = "Agreement Summary";
			agreementSummaryLink.CommandArgument = GetNavigationKeyValue("SubNavigation.Agreements.AgreementSummaryURL", "");

			financialSummaryLink = new LinkButton();
			financialSummaryLink.CommandName = financialSummaryLink.Text = "Financial Summary";
			financialSummaryLink.CommandArgument = GetNavigationKeyValue("SubNavigation.Agreements.FinancialSummaryURL", "");

            arraPIQuestionnaireLink = new LinkButton();
            arraPIQuestionnaireLink.CommandName = arraPIQuestionnaireLink.Text = CommandNameArraPIQuestionnaire;
            arraPIQuestionnaireLink.CommandArgument = GetNavigationKeyValue("SubNavigation.Agreements.ArraPIQuestionnaireListURL", "");

            arraStimulusFundingLink = new LinkButton();
            arraStimulusFundingLink.CommandName = arraStimulusFundingLink.Text = "Stimulus Funding";
            arraStimulusFundingLink.CommandArgument = GetNavigationKeyValue("SubNavigation.Agreements.StimulusReportingURL", "");

            arraProposalDataLink = new LinkButton();
            arraProposalDataLink.CommandName = arraProposalDataLink.Text = ArraProposalDataCommand;
            arraProposalDataLink.CommandArgument = GetNavigationKeyValue("SubNavigation.Agreements.ProposalDataURL", "");

            arraSubRecipientDataLink = new LinkButton();
            arraSubRecipientDataLink.CommandName = arraSubRecipientDataLink.Text = ArraSubRecipientDataCommand;
            arraSubRecipientDataLink.CommandArgument = GetNavigationKeyValue("SubNavigation.Agreements.SubRecipientDataURL", "");

            arraVendorDataLink = new LinkButton();
            arraVendorDataLink.CommandName = arraVendorDataLink.Text = ArraVendorDataCommand;
            arraVendorDataLink.CommandArgument = GetNavigationKeyValue("SubNavigation.Agreements.VendorDataURL", "");

			transactionsOverviewLink = new LinkButton();
			transactionsOverviewLink.CommandName = transactionsOverviewLink.Text = TransactionOverviewCommand;
			transactionsOverviewLink.CommandArgument = GetNavigationKeyValue("SubNavigation.Agreements.TransactionsOverviewURL", "");

			budgetOverviewLink = new LinkButton();
			budgetOverviewLink.CommandName = budgetOverviewLink.Text = BudgetOverviewCommand;
			budgetOverviewLink.CommandArgument = GetNavigationKeyValue("SubNavigation.Agreements.BudgetOverviewURL", "");

			salaryOverviewLink = new LinkButton();
			salaryOverviewLink.CommandName = salaryOverviewLink.Text = SalaryOverviewCommand;
			salaryOverviewLink.CommandArgument = GetNavigationKeyValue("SubNavigation.Agreements.SalaryOverviewURL", "");

			expenseOverviewLink = new LinkButton();
			expenseOverviewLink.CommandName = expenseOverviewLink.Text = ExpenseOverviewCommand;
			expenseOverviewLink.CommandArgument = GetNavigationKeyValue("SubNavigation.Agreements.ExpenseOverviewURL", "");

            advanceFundRequestLink = new LinkButton();
            advanceFundRequestLink.CommandName = advanceFundRequestLink.Text = CommandNameAdvanceFundRequest;
            advanceFundRequestLink.CommandArgument = GetNavigationKeyValue("SubNavigation.Agreements.AdvanceFundRequestLandingURL", "");

		}

		/// <summary>
		/// Setup the control tree to reflect the actual (and exact) layout of the controls within the AgreementsSubNavigation.
		/// </summary>
		protected override void GenerateControlTree()
		{
			CreateSummaryLinks();
			if (EnableOverviewNavigation)
				CreateOverviewLinks();
		}

		/// <summary>
		/// The selection in the context of this control is a combination of two-level navigation, and the original intent
		/// expressed by teh base class (SubNavigation) does not support it. An exception will be thrown if this method is
		/// ever invoked. The actual replacement for this method is a pair of methods: GetSelectedSummaryLink and
		/// GetSelectedOverviewLink.
		/// </summary>
		/// <returns>Nothing</returns>
		protected override LinkButton GetSelectedLink()
		{
			throw new Exception("AgreementSubNavigation does not implement the GetSelectedLink() method");
		}

		/// <summary>
		/// Gets the key used to the store the SelectedSubNavigationLink information.
		/// </summary>
		protected override string SelectedSubNavigationLinkKey
		{
			get { return SelectedAgreementSubNavigationLinkKey; }
		}

		/// <summary>
		/// This method is invoked by the base class when a link is clicked upon.
		/// Store the navigation information as a Pair consisting of the summary-level and overview-level navigation.
		/// </summary>
		/// <param name="commandName">Name of the link currently clicked upon</param>
		protected override void ManageSelection(string commandName)
		{
			Pair pair = Page.Session[SelectedSubNavigationLinkKey] as Pair;
			if (pair == null)
				pair = new Pair(financialSummaryLink.CommandName, null);

			CommonSearchContext searchContext = (CommonSearchContext)cachePolicy.GetCachedObject(CommonSearchContext.CacheKey);

            if ((commandName == agreementSummaryLink.CommandName) || (commandName == financialSummaryLink.CommandName) || (commandName == arraPIQuestionnaireLink.CommandName) || (commandName == arraStimulusFundingLink.CommandName))
			{
				pair.First = commandName;
				searchContext.CurrentLevel = SearchCriteria.Level.Summary;
            }
			else if ((commandName == transactionsOverviewLink.CommandName) ||
				(commandName == budgetOverviewLink.CommandName) || (commandName == salaryOverviewLink.CommandName) ||
                (commandName == expenseOverviewLink.CommandName) || (commandName == arraProposalDataLink.CommandName) ||
                (commandName == arraSubRecipientDataLink.CommandName) || (commandName == arraVendorDataLink.CommandName))
			{
				pair.Second = commandName;
				searchContext.CurrentLevel = SearchCriteria.Level.Overview;
			}

			if (pair.First == null)
				throw new Exception("AgreementSubNavigation cannot occur without a valid summary link selection");

			Page.Session[SelectedSubNavigationLinkKey] = pair;
		}

		#endregion

		#region Event Handlers
		/// <summary>
		/// Disable view state.
		/// </summary>
		/// <param name="e">Argument associated with the load event.</param>
		protected override void OnLoad(EventArgs e)
		{
			EnableViewState = false;
            intAdmPersonId = ((UserContext)cachePolicy.GetCachedObject(UserContext.CacheKey)).PersonId;
			base.OnLoad (e);
            
            
		}
		#endregion

		#region Private Methods
		/// <summary>
		/// Create the layout necessary to display the overview navigation.
		/// </summary>
		private void CreateOverviewLinks()
		{
            Pair pair = Page.Session[SelectedSubNavigationLinkKey] as Pair;
            if (pair == null)
            {
                pair = new Pair();
                pair.First = financialSummaryLink.CommandName;
            }
            
			Table table = new Table();
			table.ID = "overviewLinks";
			Controls.Add(table);
			table.CssClass = "SubModuleOverviewNavigation";

			TableRow row = new TableRow();
			table.Rows.Add(row);

			TableCell cell = new TableCell();
			row.Cells.Add(cell);
			cell.CssClass = "SubModuleOverviewNavigationFillerCell";
			cell.Controls.Add(new LiteralControl("&nbsp;"));

			cell = new TableCell();
			row.Cells.Add(cell);

			table = new Table();
			cell.Controls.Add(table);

			row = new TableRow();
			table.Rows.Add(row);

			cell = new TableCell();
			row.Cells.Add(cell);

			cell = new TableCell();
			row.Cells.Add(cell);
            if (pair.First.ToString() == financialSummaryLink.CommandName || pair.First.ToString() == agreementSummaryLink.CommandName) cell.Controls.Add(transactionsOverviewLink);

			cell = new TableCell();
			row.Cells.Add(cell);

			cell = new TableCell();
			row.Cells.Add(cell);
            if (pair.First.ToString() == financialSummaryLink.CommandName || pair.First.ToString() == agreementSummaryLink.CommandName) cell.Controls.Add(budgetOverviewLink);

			cell = new TableCell();
			row.Cells.Add(cell);

			cell = new TableCell();
			row.Cells.Add(cell);
            if (pair.First.ToString() == financialSummaryLink.CommandName || pair.First.ToString() == agreementSummaryLink.CommandName) cell.Controls.Add(salaryOverviewLink);

			cell = new TableCell();
			row.Cells.Add(cell);

			cell = new TableCell();
			row.Cells.Add(cell);
            if (pair.First.ToString() == financialSummaryLink.CommandName || pair.First.ToString() == agreementSummaryLink.CommandName) cell.Controls.Add(expenseOverviewLink);

            cell = new TableCell();
            row.Cells.Add(cell);

            cell = new TableCell();
            row.Cells.Add(cell);

            cell = new TableCell();
            row.Cells.Add(cell);

            cell = new TableCell();
            row.Cells.Add(cell);

            cell = new TableCell();
            row.Cells.Add(cell);
            if (pair.First.ToString() == arraPIQuestionnaireLink.CommandName || pair.First.ToString() == arraStimulusFundingLink.CommandName) cell.Controls.Add(arraProposalDataLink);

            cell = new TableCell();
            row.Cells.Add(cell);

            cell = new TableCell();
            row.Cells.Add(cell);
            if (pair.First.ToString() == arraPIQuestionnaireLink.CommandName || pair.First.ToString() == arraStimulusFundingLink.CommandName) cell.Controls.Add(arraSubRecipientDataLink);

            cell = new TableCell();
            row.Cells.Add(cell);

            cell = new TableCell();
            row.Cells.Add(cell);
            if (pair.First.ToString() == arraPIQuestionnaireLink.CommandName || pair.First.ToString() == arraStimulusFundingLink.CommandName ) cell.Controls.Add(arraVendorDataLink);

			CreateSelectedOverviewLinkAdornments(row);
		}

		/// <summary>
		/// The selected link cell is given a prefix and suffix image as adornments. In addition the background of the
		/// cell is of a different style.
		/// </summary>
		/// <param name="row">Module navigation row which contains the module link cells</param>
		/// <param name="selectedLink">Currently selected link</param>
		/// <param name="selectedCssClass">CSS class to be associated with the selected link</param>
		/// <param name="adornmentCssClass">CSS class to be associated with the selected link adornment</param>
		/// <param name="prefixImage">Imaage to be used as the prefix for the selected link</param>
		/// <param name="suffixImage">Image to be used as the suffix for the selected link</param>
		private void CreateSelectedLinkAdornments(TableRow row, LinkButton selectedLink, string selectedCssClass,
			string adornmentCssClass, string prefixImage, string suffixImage)
		{
			if (selectedLink != null)
			{
				foreach (TableCell cell in row.Cells)
				{
					if ((cell.Controls.Count == 1) && (cell.Controls[0] == selectedLink))
					{
						cell.CssClass = selectedCssClass;

						TableCell adornmentCell = new TableCell();
						adornmentCell.CssClass = adornmentCssClass;
						row.Cells.AddAt(row.Cells.GetCellIndex(cell), adornmentCell);

						Image image = new Image();
						image.ImageUrl = prefixImage;
						if (!IsDesignMode)
							adornmentCell.Width = (new System.Drawing.Bitmap(Context.Server.MapPath(prefixImage))).Width;
						adornmentCell.Controls.Add(image);

						adornmentCell = new TableCell();
						adornmentCell.CssClass = adornmentCssClass;
						row.Cells.AddAt(row.Cells.GetCellIndex(cell) + 1, adornmentCell);

						image = new System.Web.UI.WebControls.Image();
						image.ImageUrl = suffixImage;
						if (!IsDesignMode)
							adornmentCell.Width = (new System.Drawing.Bitmap(Context.Server.MapPath(suffixImage))).Width;
						adornmentCell.Controls.Add(image);

						break;
					}
				}
			}
		}

		/// <summary>
		/// The selected overview link cell is given a prefix and suffix image as adornments. In addition the background of the
		/// cell is of a different style.
		/// </summary>
		/// <param name="row">Module navigation row which contains the module link cells</param>
		private void CreateSelectedOverviewLinkAdornments(TableRow row)
		{
			CreateSelectedLinkAdornments(row, GetSelectedOverviewLink(), "SubModuleNavigationSelectedOverview",
				"SubModuleNavigationSelectedOverviewAdornment",	"../Images/Row3_Left.gif", "../Images/Row3_Right.gif");
		}

		/// <summary>
		/// The selected summary link cell is given a prefix and suffix image as adornments. In addition the background of the
		/// cell is of a different style.
		/// </summary>
		/// <param name="row">Module navigation row which contains the module link cells</param>
		private void CreateSelectedSummaryLinkAdornments(TableRow row)
		{
			CreateSelectedLinkAdornments(row, GetSelectedSummaryLink(), "SubModuleNavigationSelectedSummary",
				"SubModuleNavigationSelectedSummaryAdornment", "../Images/Row2_Left.gif", "../Images/Row2_Right.gif");
		}


        /// <summary>
        /// Sets the required controls(links)which needs to be available depending on the access rights available to the logged in user.
        /// </summary>
        private void SetRequiredControls()
        {
            blnShowArraStimulusFunding = true;
            blnShowAdvanceFundRequest = true;
            intAccessLevel = intAccessLevel | ((UserContext)cachePolicy.GetCachedObject(UserContext.CacheKey)).ModuleRoleBitmask;
            if ((intAccessLevel & (int)Security.Enumerations.ModuleRoleBit.PrincipalInvestigator) > 0 || (IsLoggedInUserDepartmentAdmin == true))  //User is PI or DA Admin
            {
                blnShowArraPIQuestionnaire = true;
            }
        }

		/// <summary>
		/// Create the layout required to display the summary navigation links.
		/// </summary>
		private void CreateSummaryLinks()
		{
			Table table = new Table();
			Controls.Add(table);
			table.CssClass = "SubModuleSummaryNavigation";

			TableRow row = new TableRow();
			table.Rows.Add(row);

			TableCell cell = new TableCell();
			row.Cells.Add(cell);
			cell.CssClass = "SubModuleSummaryNavigationFillerCell";
			cell.Controls.Add(new LiteralControl("&nbsp;"));

			cell = new TableCell();
			row.Cells.Add(cell);

			table = new Table();
			cell.Controls.Add(table);

			row = new TableRow();
			table.Rows.Add(row);

			cell = new TableCell();
			row.Cells.Add(cell);

			cell = new TableCell();
			row.Cells.Add(cell);
			cell.Controls.Add(agreementSummaryLink);

			cell = new TableCell();
			row.Cells.Add(cell);
			cell.Controls.Add(financialSummaryLink);
            if (blnShowArraStimulusFunding)
            {
                cell = new TableCell();
                row.Cells.Add(cell);
                cell.Controls.Add(arraStimulusFundingLink);
            }
            if (blnShowArraPIQuestionnaire)
            {
                cell = new TableCell();
                row.Cells.Add(cell);
                cell.Controls.Add(arraPIQuestionnaireLink);
            }
            if (blnShowAdvanceFundRequest)
            {
                cell = new TableCell();
                row.Cells.Add(cell);
                cell.Controls.Add(advanceFundRequestLink);
            }
			CreateSelectedSummaryLinkAdornments(row);
		}

		private static string GetNavigationKeyValue(string key, string defaultValue)
		{
			return IsDesignMode ? defaultValue : Utility.Settings.GetKeyValue(key, defaultValue);
		}

		/// <summary>
		/// Get the currrently selected overview navigation link. If no selection has yet been made, the TransactionOverview
		/// link is used as the default.
		/// </summary>
		/// <returns>Reference to the selected link button</returns>
		private LinkButton GetSelectedOverviewLink()
		{
			if (IsDesignMode)
				return null;

			Pair pair = Page.Session[SelectedAgreementSubNavigationLinkKey] as Pair;
			if (pair == null)
				return null;

			string commandName = (string)pair.Second;
			if (commandName == transactionsOverviewLink.CommandName)
				return transactionsOverviewLink;
			if (commandName == budgetOverviewLink.CommandName)
				return budgetOverviewLink;
			if (commandName == salaryOverviewLink.CommandName)
				return salaryOverviewLink;
			if (commandName == expenseOverviewLink.CommandName)
				return expenseOverviewLink;
            if (commandName == arraProposalDataLink.CommandName)
                return arraProposalDataLink;
            if (commandName == arraSubRecipientDataLink.CommandName)
                return arraSubRecipientDataLink;
            if (commandName == arraVendorDataLink.CommandName)
                return arraVendorDataLink;

			return null;
		}

		/// <summary>
		/// Get the currrently selected summary navigation link. If no selection has yet been made, the AgreementSummary
		/// link is used as the default.
		/// </summary>
		/// <returns>Reference to the selected link button</returns>
		private LinkButton GetSelectedSummaryLink()
		{
			if (IsDesignMode)
				return financialSummaryLink;

			Pair pair = Page.Session[SelectedAgreementSubNavigationLinkKey] as Pair;
			if (pair == null)
				return financialSummaryLink;

			string commandName = (string)pair.First;
			if (commandName == agreementSummaryLink.CommandName)
				return agreementSummaryLink;

			if (commandName == financialSummaryLink.CommandName)
				return financialSummaryLink;

            if (commandName == arraPIQuestionnaireLink.CommandName)
                return arraPIQuestionnaireLink;

            if (commandName == arraStimulusFundingLink.CommandName)
                return arraStimulusFundingLink;

            if (commandName == advanceFundRequestLink.CommandName)
                return advanceFundRequestLink;
          

			throw new Exception(string.Format("Invalid summary link {0}", pair.First));
		}
		#endregion

		#region Private Properties
		/// <summary>
		/// Return true if the control is in design mode.
		/// </summary>
		private static bool IsDesignMode
		{
			get { return HttpContext.Current == null; }
		}


        #region Behavior Control properties
        /// <summary>
        /// Gets/Sets the AccesLevel of the User
        /// </summary>
        public int AccessLevel
        {
            get { return intAccessLevel; }
            set { intAccessLevel = value; }
        }

        /// <summary>
        /// Gets/Sets the AccesLevel of the User
        /// </summary>
        public bool IsLoggedInUserDepartmentAdmin
        {
            get { return GetArraDepartmentAdmin(intAdmPersonId); }
        }

        private bool GetArraDepartmentAdmin(int intAdmPersonId)
        {
            bool blnReturnValue = false;
            DataTable dtArraDepartmentAdmin = DataAccess.GetDataTable(Utility.DataAccess.ConnectionString, "GetArraDepartmentAdmin",
                        Utility.DataAccess.BuildSqlParameterArray(
                        "@admPersonId", SqlDbType.Int, intAdmPersonId
                        ));

            //blnReturnValue = (Convert.ToInt16(dtArraDepartmentAdmin.Rows[0][0].ToString()) == 0 ? false : true);
            blnReturnValue = Convert.ToInt16(dtArraDepartmentAdmin.Rows[0][0].ToString()) > 0;

            return blnReturnValue;

        }
        #endregion

		#endregion
	}

	#region Class AgreementsSubNavigationDesigner
	/// <summary>
	/// Designer associated with the control.
	/// </summary>
	public class AgreementsSubNavigationDesigner : ControlDesigner
	{
		#region Overrides
		/// <summary>
		/// Force the control to create its child controls for display at design time.
		/// </summary>
		/// <returns>HTML representation of the control</returns>
		public override string GetDesignTimeHtml()
		{
			((AgreementsSubNavigation)Component).Design();
			return base.GetDesignTimeHtml();
		}
		#endregion
	}
	#endregion
}

// --- EOF ---
